import request from '@/utils/request'
// **************我的工单**********************
export function activityList(data) { // 活动列表
  return request({
    url: '/market-activity/activity/list',
    method: 'get',
    params: data
  })
}
export function addActivity(data, method) { // 添加活动
  return request({
    url: '/market-activity/activity',
    method: method,
    data
  })
}
export function activityDetails(activityId) { // 获取活动详情
  return request({
    url: '/market-activity/activity/' + activityId,
    method: 'get'
  })
}
export function activityGoodsList(data) { // 活动商品列表
  return request({
    url: '/market-activity/activityGoods',
    method: 'get',
    params: data
  })
}
export function addActivityGoods(data, method) { // 添加活动商品
  return request({
    url: '/market-activity/activityGoods',
    method: method,
    data
  })
}

export function delActivity(arr) {
  return request({
    url: '/market-activity/activity/' + arr,
    method: 'DELETE'
  })
}

export function delActivityGoods(arr) {
  return request({
    url: '/market-activity/activityGoods/' + arr,
    method: 'DELETE'
  })
}
